All Questions
3 questions
1vote
2answers
52views
replace both filename and filename's content relying solely on pattern found on the name-of-the-file
I'd like to know if it's possible to replace both filename.ext and a matched pattern inside its content regarding a pattern founded on the filename itself using sed (and grep also, maybe?). Let me ...
2votes
3answers
483views
How to find the last occurrence of a string in column 1 and replace the corresponding value in column 3?
I have three columns in a file as such: apple1 10109283 20012983 apple1 10983102 10293809 apple1 10293893 2349823049 apple10 109283019 109238901 apple10 ...
1vote
1answer
185views
Odd behavior (bug?) of sed when using $
I've got a problem and I am not sure whether this is a bug or if this is supposed to happen when using $ for addressing lines. Basically, I have the following command: sed -e '$s/test/tset/g' Usually,...